import { classifyService } from '@/service/admin/ClassifyService'
import { Service, Inject } from 'typedi';
import { res } from '@/utils/jsonResult';
import { CommentParams } from '@/model/request/Comment';
import { Token } from '@/m_req/Token'
import { Categories } from '@/entity/Categories';
import { Essayreq, Essayupdata } from '@/model/request/Essayreq';
import { classifyDao } from '@/dao/admin/ClassifyDao';
//后端分类
@Service()
export class classifyServiceImpl implements classifyService {

  @Inject()
  classifyDao!: classifyDao



  //后端分类添加
  async classifyadd(Promise: { categories_title: string }): Promise<res<null>> {
    return this.classifyDao.classifyadd(Promise)
  }

  //分类删除
  async classifydelete(Promise: { categories_title: string }): Promise<res<null>> {
    return this.classifyDao.classifydelete(Promise)
  }


  //分类修改
  async classifyupdata(Promise: { categories_title: string }): Promise<res<null>> {
    return this.classifyDao.classifyupdata(Promise)
  }
  
  //分类修改
  async classifyselect(params:{page:number}): Promise<res<Categories>> {
    return this.classifyDao.classifyselect(params)
  }
  
  async classifyqueries(params:{text:string}): Promise<res<Categories>> {
    return this.classifyDao.classifyqueries(params)
  }
}